07 - Frontend-Architecture
Relevant source files
This document describes the Next.js 14-based frontend implementation of godeep.wiki. It covers the App Router structure, root layout configuration, theming system based on oklch color space, reusable UI components, and animation utilities. For information about the backend API routes, see Authentication & GitHub Integration and Payment Processing. For details about the user-facing page flows, see User Journey.
Next.js 14 App Router StructureLink copied!
The application uses Next.js 14's App Router architecture with a minimal route structure. The app/ directory contains all routes and layouts, following the file-system-based routing convention.
Route StructureLink copied!
Sources: app/layout.tsx L1-L82
The application has only one primary user-facing route:
/- Landing page with payment CTA (app/page.tsx L1-L214 )/admin- Admin panel (documented in Admin Panel)/success- Post-payment success page (documented in Success Page & GitHub Connection)/thank-you- Post-OAuth thank you page (documented in Thank You Page)/privacyand/terms- Legal pages (documented in Legal & Static Pages)
All routes share the root layout defined in app/layout.tsx L58-L81
Root Layout SystemLink copied!
The RootLayout component in app/layout.tsx L58-L81
provides the application-wide structure, metadata, font loading, and third-party integrations.
Layout ConfigurationLink copied!
| Feature | Implementation | Location |
|---|---|---|
| HTML Class | dark (forces dark mode) | app/layout.tsx L66 |
| Font System | Geist Sans & Geist Mono | app/layout.tsx L3-L9 |
| Analytics | Vercel Analytics | app/layout.tsx L4-L69 |
| Monitoring | Cloudflare Web Analytics | app/layout.tsx L70-L77 |
| Metadata | SEO, Open Graph, Twitter Card | app/layout.tsx L11-L56 |
Metadata ConfigurationLink copied!
The application defines comprehensive metadata for SEO optimization:
Sources: app/layout.tsx L11-L56
Key metadata elements:
- Title Template:
"%s | godeep.wiki"allows page-specific titles (app/layout.tsx L14 ) - Keywords: Targets search terms like "code documentation", "github analysis", "architecture diagrams" (app/layout.tsx L18-L26 )
- Metadata Base:
https://godeep.wikifor absolute URL resolution (app/layout.tsx L29 ) - Generator: Tagged with
'v0.app'(app/layout.tsx L55 )
Third-Party IntegrationsLink copied!
The layout integrates two external services:
- Vercel Analytics (app/layout.tsx L69 ): Provides page view and Web Vitals tracking
- Cloudflare Web Analytics (app/layout.tsx L70-L77 ): Uses beacon token from
NEXT_PUBLIC_CF_BEACON_TOKENenvironment variable
Both integrations use the afterInteractive loading strategy to avoid blocking page rendering.
Sources: app/layout.tsx L58-L81
Theme System & Color PaletteLink copied!
The application uses a sophisticated theming system based on the oklch color space, which provides perceptually uniform colors with better support for wide-gamut displays compared to traditional RGB or HSL.
CSS Custom Properties ArchitectureLink copied!
Sources: app/globals.css L6-L75
Color Token SystemLink copied!
The theme defines multiple layers of color tokens:
Semantic Color Tokens (app/globals.css L7-L40
):
--background/--foreground: Base colors (white/black)--primary/--primary-foreground: Main brand colors--secondary/--secondary-foreground: Secondary UI elements--muted/--muted-foreground: Subdued text and backgrounds--accent/--accent-foreground: Accent colors for highlights--destructive/--destructive-foreground: Error states
UI Component Tokens (app/globals.css L9-L25
):
--card/--card-foreground: Card backgrounds and text--popover/--popover-foreground: Popover/modal styling--border: Border colors--input: Input field borders--ring: Focus ring colors
Chart Colors (app/globals.css L26-L30
): Five distinct colors for data visualization:
--chart-1through--chart-5
oklch Color SpaceLink copied!
All colors use the oklch format: oklch(L C H) where:
- L (Lightness): 0-1 scale (0 = black, 1 = white)
- C (Chroma): Color intensity (0 = grayscale)
- H (Hue): 0-360 degrees
Example from app/globals.css L7
:
--background: oklch(1 0 0); /* Pure white: L=1, no chroma */--foreground: oklch(0.145 0 0); /* Dark gray: L=0.145, no chroma */
Dark Mode ImplementationLink copied!
The application forces dark mode via the dark class on the <html> element (app/layout.tsx L66
). Dark mode overrides are defined in app/globals.css L42-L75
inverting lightness values:
| Token | Light Mode | Dark Mode |
|---|---|---|
--background | oklch(1 0 0) (white) | oklch(0.145 0 0) (dark) |
--foreground | oklch(0.145 0 0) (dark) | oklch(0.985 0 0) (light) |
--primary | oklch(0.205 0 0) | oklch(0.985 0 0) |
--muted-foreground | oklch(0.556 0 0) | oklch(0.708 0 0) |
Sources: app/globals.css L6-L75
Tailwind IntegrationLink copied!
The @theme inline directive (app/globals.css L77-L116
) maps CSS custom properties to Tailwind CSS tokens:
--color-background: var(--background);--color-foreground: var(--foreground);--radius-lg: var(--radius);
This enables Tailwind utilities like bg-background, text-foreground, and rounded-lg to use the theme system.
Sources: app/globals.css L77-L116
UI Component LibraryLink copied!
The application includes five reusable UI components that implement the visual design system. All components are client-side ("use client") to support interactivity.
Component Hierarchy on Landing PageLink copied!
Sources: app/page.tsx L1-L214
components/background-reveal.tsx L1-L18
components/beam-button.tsx L1-L26
components/icon-glow.tsx L1-L20
components/spotlight-card.tsx L1-L68
BeamButton ComponentLink copied!
Location: components/beam-button.tsx L1-L26
A call-to-action button with animated gradient border effect on hover.
Key Features:
- Animated Gradient Border: Uses
absolutepositioned gradient background with blur effect (components/beam-button.tsx L13 ) - Hover Effects: Opacity transition on gradient, shadow intensity increase (components/beam-button.tsx L13-L16 )
- Base Styling: Blue background (
bg-blue-600), rounded full, custom shadow (components/beam-button.tsx L16-L17 )
Props Interface:
interface BeamButtonProps extends React.ComponentProps<typeof Button> { children: React.ReactNode}
Usage in Landing Page: app/page.tsx L63-L66
Sources: components/beam-button.tsx L1-L26
SpotlightCard ComponentLink copied!
Location: components/spotlight-card.tsx L1-L68
An interactive card that displays a radial gradient spotlight effect following the user's cursor.
Implementation Details:
- Mouse Tracking: Uses
MouseEventto calculate cursor position relative to card (components/spotlight-card.tsx L15-L20 ) - Radial Gradients: Two overlapping gradients at cursor position (components/spotlight-card.tsx L48-L63 ) * Outer gradient: 600px radius, 6% opacity white * Inner gradient: 200px radius mask, 10% opacity white
- State Management: Tracks
position(x, y) andopacity(0 or 1) (components/spotlight-card.tsx L12-L13 ) - Event Handlers:
onMouseMove,onMouseEnter,onMouseLeave,onFocus,onBlur(components/spotlight-card.tsx L30-L36 )
CSS Mask Usage:
maskImage: `radial-gradient(200px circle at ${position.x}px ${position.y}px, black, transparent)`,WebkitMaskImage: `radial-gradient(200px circle at ${position.x}px ${position.y}px, black, transparent)`,
Usage in Landing Page: app/page.tsx L117-L122
- wraps six feature cards in "What You Get" section
Sources: components/spotlight-card.tsx L1-L68
IconGlow ComponentLink copied!
Location: components/icon-glow.tsx L1-L20
A wrapper that adds an animated glow effect to icons on hover.
Implementation:
- Double-Layer Glow: Background glow with blur + border glow on hover (components/icon-glow.tsx L13-L14 )
- Transition: Opacity transition from 0 to 100 on
group-hover/icon(components/icon-glow.tsx L13 ) - Container: 12×12 rounded square with slate background and border (components/icon-glow.tsx L14 )
Usage in Landing Page: app/page.tsx L75-L77
- wraps GitHub, Brain, and FileText icons
Sources: components/icon-glow.tsx L1-L20
FadeIn ComponentLink copied!
Location: components/fade-in.tsx L1-L55
A scroll-triggered animation wrapper that fades in and slides up content when it enters the viewport.
Implementation Strategy:
- IntersectionObserver: Detects when element enters viewport (components/fade-in.tsx L17-L28 ) *
rootMargin: "0px 0px -50px 0px": Triggers 50px before element reaches bottom of viewport *threshold: 0.1: Triggers when 10% of element is visible - Animation Control: Sets
animationPlayStateto"running"when visible (components/fade-in.tsx L48 ) - Custom Keyframes: Uses
animate-enterclass defined in app/globals.css L128-L144
Props:
interface FadeInProps { children: React.ReactNode className?: string delay?: number // Milliseconds duration?: number // Seconds}
Usage Pattern in Landing Page: Wraps all major sections with staggered delays:
- Hero badge: 0ms delay (app/page.tsx L34 )
- Title: 100ms delay (app/page.tsx L41 )
- Description: 200ms delay (app/page.tsx L46 )
- Button: 300ms delay (app/page.tsx L60 )
Sources: components/fade-in.tsx L1-L55
BackgroundReveal ComponentLink copied!
Location: components/background-reveal.tsx L1-L18
A decorative background effect that animates six vertical panels revealing from top to bottom.
Implementation:
- Fixed Positioning:
fixed inset-0 z-[-1]- covers entire viewport behind content (components/background-reveal.tsx L5 ) - Six Panels: Array map creates six
flex-1divs (components/background-reveal.tsx L6-L14 ) - Staggered Animation: Each panel has
animationDelay: ${i * 0.1}s(components/background-reveal.tsx L11 ) - Reveal Effect: Uses
animate-revealclass withclip-pathanimation (app/globals.css L146-L154 )
Animation Keyframes:
@keyframes reveal-down { 0% { clip-path: inset(0 0 100% 0); } /* Hidden */ 100% { clip-path: inset(0 0 0 0); } /* Fully revealed */}
Usage: Single instance at the root of the landing page (app/page.tsx L15
)
Sources: components/background-reveal.tsx L1-L18
Landing Page ArchitectureLink copied!
The landing page (/) is the primary user entry point, implemented in app/page.tsx L1-L214
It is a server component that imports client components for interactivity.
Page Structure OverviewLink copied!
Sources: app/page.tsx L1-L214
Navigation BarLink copied!
Location: app/page.tsx L17-L28
Components:
- Logo container: Blue glowing box with
BookOpenicon (app/page.tsx L19-L22 ) - Brand text: "godeep" (slate-100) + ".wiki" (slate-500) with hover glow effect (app/page.tsx L23-L26 )
- Max width:
max-w-5xlcentered with padding (app/page.tsx L17 )
Hero SectionLink copied!
Location: app/page.tsx L32-L69
Elements (all wrapped in FadeIn with staggered delays):
- Status Badge (app/page.tsx L35-L38 ): * Text: "Think Deep Research for GitHub" * Pulsing blue dot indicator * Border with blur backdrop
- Main Heading (app/page.tsx L42-L44 ): * Text: "Your Private Code Wiki" * Gradient text:
from-slate-100 to-slate-400* Font size:text-6xl md:text-8xl - Subheading (app/page.tsx L47-L58 ): * Links to external DeepWiki site (app/page.tsx L49-L56 ) * Orange accent color with hover effects * Underline decoration
- Primary CTA (app/page.tsx L61-L67 ): *
BeamButtoncomponent * Form withcreateCheckoutSessionserver action (app/page.tsx L62 ) * Text: "Generate DeepWiki — $10"
How It Works SectionLink copied!
Location: app/page.tsx L72-L102
Three-column grid showcasing the user workflow:
| Step | Icon | Title | External Link |
|---|---|---|---|
| 1 | GitHub | Connect GitHub | - |
| 2 | Brain | Devin analyzes | devin.ai/pricing |
| 3 | FileText | Download DeepWiki | - |
Each icon is wrapped in IconGlow component for hover effects.
Sources: app/page.tsx L72-L102
What You Get SectionLink copied!
Location: app/page.tsx L105-L126
Grid of six SpotlightCard components displaying deliverables:
Grid Configuration:
- Mobile:
grid-cols-2 - Desktop:
md:grid-cols-3 - Each card has 50ms staggered delay (app/page.tsx L116 )
Sources: app/page.tsx L105-L126
Why DeepWiki SectionLink copied!
Location: app/page.tsx L129-L170
Two-column layout with four benefit items:
| Icon | Benefit | Description |
|---|---|---|
| Zap | Faster onboarding | "Understand new codebases in minutes, not days" |
| Brain | LLM-ready | "Perfect context for Claude, GPT-4, or other AI coding assistants" |
| Layers | Deeper understanding | "See the hidden connections and architecture clearly" |
| Clock | Saves hours | "Skip the manual reading and diagramming" |
Pricing SectionLink copied!
Location: app/page.tsx L173-L194
Content:
- Price display: "$10" (app/page.tsx L177 )
- Descriptor: "One-time payment per repository" (app/page.tsx L178 )
- Payment button:
BeamButtonwith Stripe form (app/page.tsx L181-L185 ) - Security note: "Secure payment via Stripe" (app/page.tsx L187-L191 )
- Guarantee: "100% money-back guarantee if analysis fails" (app/page.tsx L190 )
FooterLink copied!
Location: app/page.tsx L198-L210
Elements:
- Copyright: "© 2025 godeep.wiki" (app/page.tsx L200 )
- Legal links:
/termsand/privacy(app/page.tsx L202-L207 ) - Responsive flex layout: column on mobile, row on desktop
Sources: app/page.tsx L198-L210
Animation SystemLink copied!
The application uses a custom animation system built on CSS keyframes and the Web Animations API via IntersectionObserver.
Animation PipelineLink copied!
Sources: components/fade-in.tsx L16-L39
Keyframe DefinitionsLink copied!
Enter Animation
Location: app/globals.css L128-L144
Used by FadeIn component to create fade-in with upward slide:
@keyframes enter { 0% { opacity: 0; transform: translateY(10px); filter: blur(4px); } 100% { opacity: 1; transform: none; filter: none; }}
Properties:
- Duration: Configurable via prop (default 0.5s)
- Easing: Default browser easing
- Fill mode:
both(maintains end state)
Reveal Down Animation
Location: app/globals.css L146-L158
Used by BackgroundReveal component for vertical panel reveal:
@keyframes reveal-down { 0% { clip-path: inset(0 0 100% 0); } 100% { clip-path: inset(0 0 0 0); }}
Properties:
- Duration: 1s
- Easing:
cubic-bezier(0.77, 0, 0.175, 1)(custom ease-in-out) - Fill mode:
both
IntersectionObserver ConfigurationLink copied!
The FadeIn component uses IntersectionObserver with specific thresholds:
Configuration (components/fade-in.tsx L24-L27
):
{ rootMargin: "0px 0px -50px 0px", // Trigger 50px before viewport bottom threshold: 0.1, // Trigger at 10% visibility}
Behavior:
- Early Trigger: The negative bottom margin causes animations to start before elements are fully visible
- One-Time Execution: Observer disconnects after first trigger (components/fade-in.tsx L21 )
- Paused State: Animation starts paused and runs only when
isVisibleis true (components/fade-in.tsx L48 )
Sources: components/fade-in.tsx L16-L39
Favicon GenerationLink copied!
The application generates its favicon dynamically using Next.js's ImageResponse API.
Location: app/icon.tsx L1-L39
Configuration:
- Runtime: Edge runtime for fast generation (app/icon.tsx L4 )
- Size: 32×32 pixels (app/icon.tsx L7-L10 )
- Content Type: PNG (app/icon.tsx L11 )
Design:
- Black background with white "D" letter
- Centered with flexbox
- 8px border radius
- Font size: 24px, weight: 800
Sources: app/icon.tsx L1-L39
Landing Page → Checkout FlowLink copied!
The landing page integrates with the payment system through server actions.
Checkout Initiation FlowLink copied!
Sources: app/page.tsx L62-L66
The createCheckoutSession function is imported from ./actions (app/page.tsx L5
) and executed when either payment form is submitted. For implementation details, see Stripe Checkout Creation.
This frontend architecture prioritizes visual polish and user experience through sophisticated animations, interactive components, and a carefully designed color system. All components are designed for dark mode with the oklch color space providing precise, perceptually uniform colors. The minimal route structure and server-first approach via Next.js App Router keep the bundle size small while maintaining interactivity through strategic client component usage.
Refresh this wiki
Last indexed: 23 November 2025 (922b35)
On this page
- Frontend Architecture
- Next.js 14 App Router Structure
- Route Structure
- Root Layout System
- Layout Configuration
- Metadata Configuration
- Third-Party Integrations
- Theme System & Color Palette
- CSS Custom Properties Architecture
- Color Token System
- oklch Color Space
- Dark Mode Implementation
- Tailwind Integration
- UI Component Library
- Component Hierarchy on Landing Page
- BeamButton Component
- SpotlightCard Component
- IconGlow Component
- FadeIn Component
- BackgroundReveal Component
- Landing Page Architecture
- Page Structure Overview
- Navigation Bar
- Hero Section
- How It Works Section
- What You Get Section
- Why DeepWiki Section
- Pricing Section
- Footer
- Animation System
- Animation Pipeline
- Keyframe Definitions
- IntersectionObserver Configuration
- Favicon Generation
- Landing Page → Checkout Flow
- Checkout Initiation Flow
Ask Devin about godeep.wiki-jb
Syntax error in text
mermaid version 11.4.1